package com.usefullc.english.enums;


import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 熟练程度
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PracticeLevelEnum {




    NOTHING(0, "未知"),

    EASY(1, "容易"),

    NORMAL(2, "一般"),

    DIFFICULT(3, "困难"),

    ;


    private int code;
    private String value;

    PracticeLevelEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }


    public static PracticeLevelEnum getByCode(int code) {

        for (PracticeLevelEnum s : PracticeLevelEnum.values()) {
            if (s.getCode() == code) {
                return s;
            }
        }
        return null;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {


        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

}
